package game.breeze.screen;

import game.breeze.Breeze;
import game.breeze.assets.Assets;
import game.breeze.assets.StartAssets;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.actors.Image;
import com.badlogic.gdx.scenes.scene2d.actors.Label;

public class StartScreen extends BreezeScreen {
	private Label tips;

	public StartScreen(Breeze game) {
		super(game);
		StartAssets.load();
		Assets.load();
		stage = new Stage(Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), false);
	}

	float pre;

	@Override
	public void render(float delta) {
		stage.draw();
	}

	int i = 0;

	@Override
	public void show() {
		stage.addActor(new Image("start_bg", StartAssets.startBackgroudRegion));
		tips = new Label("tips", Assets.font);
		tips.color.r = tips.color.g = tips.color.b = 0;
		setMessage("Connectting Server,Please Wait");
		stage.addActor(tips);
	}

	public void setMessage(String msg) {
		tips.setText(msg);
		tips.x = (Gdx.graphics.getWidth() - tips.width) / 2;
		tips.y = (Gdx.graphics.getHeight() - tips.height) / 2;
	}

	class StartStage extends Stage {
		public StartStage(float width, float height, boolean stretch) {
			super(width, height, stretch);
		}
	}
}
